/**
 * Created by wuli等等 on 2017/3/3.
 */
import React, { Component } from 'react';
import {   View,
            Text,
            StyleSheet,
            ScrollView
} from 'react-native';

import Icon from 'react-native-vector-icons/FontAwesome';
import HeaderAndBack from '../component/HeaderAndBack';
import Images from '../component/Images';
import TypeToValue from '../component/TypeToValue';
import Trabeculate from '../component/Trabeculate';
import ToMore from '../component/ToMore';
import OtherComments from './../scenes/OtherComments';

export default class Orders extends Component {
    constructor(props) {
        super(props);
        this.state = {
            title:"张师傅"
        }
    }


    render() {
        const { navigator } = this.props;
        return (
            <View style={styles.container}>
                <HeaderAndBack text={ this.state.title } navigator = { navigator }/>
                <ScrollView>
                    <View style={styles.container1}>
                            <View style={styles.img}>
                                <Images imageUrl="http://img4.duitang.com/uploads/item/201504/26/201504264843_JmYvM.jpeg"/>
                            </View>
                        <View style={styles.inf}>
                                <TypeToValue type="性别" value="男" color="#ffffff" />
                                <TypeToValue type="所在地" value="武汉" color="#ffffff"/>
                               <TypeToValue type="联系方式" value="18900056789" color="#ffffff"/>
                            <View style={{flexDirection:'row'}}>
                                <Icon name="star" size={23} color="#ffffff"/>
                                <Icon name="star" size={23} color="#ffffff"/>
                                <Icon name="star" size={23} color="#ffffff"/>
                                <Icon name="star" size={23} color="#ffffff"/>
                            </View>
                        </View>
                    </View>

                    <View style={styles.container2}>
                        <Trabeculate type="身份证" value="已认证"/>
                        <Trabeculate type="驾驶执照" value="已认证"/>
                        <Trabeculate type="货运执照" value="认证中"/>
                        <View style={styles.row}>
                            <View style={styles.type}>
                                <Text style={styles.text1}>他人评价</Text>
                            </View>
                            <View style={styles.if}>
                                <ToMore component = { OtherComments } navigator = { navigator }/>
                            </View>
                        </View>
                    </View>

                </ScrollView>
            </View>

        )
    }
}

const styles=StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor:'#EDEDED',
    },
    container1:{
        height:260,
        backgroundColor:"#0767c8",
        flexDirection:"column",
        alignItems: 'center',

    },
    img:{
        paddingTop:60,
    },
    inf:{
        flex:4,
        flexDirection:'column',
        marginLeft:10,
        paddingTop:5,
        paddingBottom:15,
        alignItems: 'center',
    },
    container2:{
        height:180,
        marginTop:30,
        backgroundColor:"#ffffff",
        flexDirection:"column",
    },
    row:{
        flex:1,
        flexDirection:"row",
        justifyContent: 'space-between',
        borderBottomWidth:1,
        borderBottomColor:"#DEDEDE",
        alignItems: 'center',
    },
    type:{
        marginLeft:15,
    },
    text1:{
        fontSize:16,
        color:"#454545"
    },
    if:{
        marginRight:15
    },

});